﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Sample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            PersianDateTime now = PersianDateTime.Now;

            MessageBox.Show("Now : " + now);
            MessageBox.Show("Now : " + now.ToString(PersianDateTimeFormat.DateTime));
            MessageBox.Show("Now : " + now.ToString("dddd dd MMMM yyyy hh:mm:ss tt"));

            MessageBox.Show("TimeOfDay(iran) : " + now.TimeOfDay);

            MessageBox.Show("FirstDayOfWeek : " + now.FirstDayOfWeek);
            MessageBox.Show("LastDayOfWeek : " + now.LastDayOfWeek);
            MessageBox.Show("DayOfWeek : " + now.DayOfWeek);

            PersianDateTime persianDate = PersianDateTime.Parse("1392/03/02");
            DateTime miladiDate = persianDate.ToDateTime();

            PersianDateTime newDate = persianDate.AddDays(5);

            TimeSpan time = newDate - persianDate;
        }
    }
}
